package cn.hznc.constant;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author：Administrator
 * @Date：2023/3/28 11:14
 */
public enum InventoryStatusEnum{
    FREE(0,"空余"),

    FULL(1,"满仓"),

    EMPTY(2,"空仓"),

    BAN(3,"禁用");

    /**
     * 状态
     */
    private Integer code;

    /**
     * 状态码
     */
    private String status;

    InventoryStatusEnum(Integer code, String status) {
        this.code = code;
        this.status = status;
    }

    public Integer getCode() {
        return code;
    }

    public String getStatus() {
        return status;
    }

    public static String getStatusByCode(Integer code){
        InventoryStatusEnum arrObj[] = InventoryStatusEnum.values();
        for (InventoryStatusEnum obj : arrObj) {
            if (code.intValue() == obj.getCode().intValue()) {
                return obj.getStatus();
            }
        }
        return "";
    }

}
